<div class="box prodBg featuredProducts">
		<div class="box-heading noBordB"><?php echo $heading_title; ?><div class="head-arrow"><i class="fa fa-caret-down"></i></div>
			<ul class="nav nav-tabs" id="product-tabs-<?php echo $module; ?>" >
				<?php if($latest_products){ ?>
					<li class="active" ><a rel="latest" href="#tab-latest-<?php echo $module; ?>"><?php echo $tab_latest; ?></a></li>
				<?php } ?>
				<?php if($featured_products){ ?>
					<li><a  rel="featured" href="#tab-featured-<?php echo $module; ?>"><?php echo $tab_featured; ?></a></li>
				<?php } ?>
				<?php if($bestseller_products){ ?>
					<li><a rel="bestseller" href="#tab-bestseller-<?php echo $module; ?>"><?php echo $tab_bestseller; ?></a></li>
				<?php } ?>
				<?php if($special_products){ ?>
					<li><a rel="special" href="#tab-special-<?php echo $module; ?>"><?php echo $tab_special; ?></a></li>
				<?php } ?>
			</ul>	
		</div>

<div class="box-content">
	<div class="tab-content">
		<?php if($latest_products){ ?>
		 <div id="tab-latest-<?php echo $module; ?>" class="tab-pane active">
		    <div rel="latest" class="box-product <?php echo ($display=="slider")?"slider40":""; ?> sliderproducttabs sliderproducttabslatest">
		      <?php foreach ($latest_products as $product) { ?>
		      <div>
		      	
                <!-- IMAGE -->
                <!--for swap image-->
                <?php if ($product['thumb_swap']) { ?>
                  <div class="image">
                      <a href="<?php echo $product['href']; ?>">
                         <img oversrc="<?php echo $product['thumb_swap']; ?>" src="<?php echo $product['thumb']; ?>" 
                         title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" style="border:none"/>
                      </a>
                  </div>
                  <?php } else { ?>
                  <div class="image">
                      <a href="<?php echo $product['href']; ?>">
                          <img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" 
                          alt="<?php echo $product['name']; ?>" style="border:none"/>
                      </a>
                  </div>
                  <?php } ?>
                <!--/ swap img-->
                
                <!-- NAME -->
                <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
                <!-- PRICE -->
                <?php if ($product['price']) { ?>
                <div class="price">
                  <?php if (!$product['special']) { ?>
                  <?php echo $product['price']; ?>
                  <?php } else { ?>
                  <span class="price-new"><?php echo $product['special']; ?></span> - 
                  <span class="price-old"><?php echo $product['price']; ?></span> 
                  <span class="sale radius">-<?php echo $product['saving']; ?>%</span>
                  <?php } ?>
                </div>
                <?php } ?>
                <!-- RATING -->
                <div class="rating"><img src="catalog/view/theme/denzi/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
                <!-- CART -->
                <ul class="cart radius tooltip-title">
                    <li><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" /></li>
                    <li><a class="wish" onclick="addToWishList('<?php echo $product['product_id']; ?>');" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>"><i class="fa fa-heart-o"></i></a></li>
                    <li><a class="compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" data-toggle="tooltip" title="<?php echo $button_compare; ?>"><i class="fa fa-bar-chart-o"></i></a></li>
                    <li><a href="<?php echo str_replace("/product&","/product/details&",$product['href']); ?>" class="href-fa-eye" data-toggle="tooltip" title="<?php echo $quick_view_text; ?>"><i class="fa fa-eye"></i></a></li>
                </ul>
                
                
		      </div>
		      <?php } ?>
		    </div>
		 </div>
		<?php } ?>
		<?php if($featured_products){ ?>
		  <div id="tab-featured-<?php echo $module; ?>" class="tab-pane">
		    <div  rel="featured"  class="box-product <?php echo ($display=="slider")?"slider40":""; ?> sliderproducttabs sliderproducttabsfeatured">
		      <?php foreach ($featured_products as $product) { ?>
		      <div>

                <!-- IMAGE -->
                <!--for swap image-->
                <?php if ($product['thumb_swap']) { ?>
                  <div class="image">
                      <a href="<?php echo $product['href']; ?>">
                         <img oversrc="<?php echo $product['thumb_swap']; ?>" src="<?php echo $product['thumb']; ?>" 
                         title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" style="border:none"/>
                      </a>
                  </div>
                  <?php } else { ?>
                  <div class="image">
                      <a href="<?php echo $product['href']; ?>">
                          <img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" 
                          alt="<?php echo $product['name']; ?>" style="border:none"/>
                      </a>
                  </div>
                  <?php } ?>
                <!--/ swap img-->
                
                <!-- NAME -->
                <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
                <!-- PRICE -->
                <?php if ($product['price']) { ?>
                <div class="price">
                  <?php if (!$product['special']) { ?>
                  <?php echo $product['price']; ?>
                  <?php } else { ?>
                  <span class="price-new"><?php echo $product['special']; ?></span> - 
                  <span class="price-old"><?php echo $product['price']; ?></span> 
                  <span class="sale radius">-<?php echo $product['saving']; ?>%</span>
                  <?php } ?>
                </div>
                <?php } ?>
                <!-- RATING -->
                <div class="rating"><img src="catalog/view/theme/denzi/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
                <!-- CART -->
                <ul class="cart radius tooltip-title">
                    <li><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" /></li>
                    <li><a class="wish" onclick="addToWishList('<?php echo $product['product_id']; ?>');" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>"><i class="fa fa-heart-o"></i></a></li>
                    <li><a class="compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" data-toggle="tooltip" title="<?php echo $button_compare; ?>"><i class="fa fa-bar-chart-o"></i></a></li>
                    <li><a href="<?php echo str_replace("/product&","/product/details&",$product['href']); ?>" class="href-fa-eye" data-toggle="tooltip" title="<?php echo $quick_view_text; ?>"><i class="fa fa-eye"></i></a></li>
                </ul>
                
               </div>
		      <?php } ?>
		    </div>
		 </div>
		<?php } ?>
		
		<?php if($bestseller_products){ ?>
		 <div id="tab-bestseller-<?php echo $module; ?>" class="tab-pane">
		    <div  rel="bestseller" class="box-product <?php echo ($display=="slider")?"slider40":""; ?> sliderproducttabs sliderproducttabsbestseller">
		      <?php foreach ($bestseller_products as $product) { ?>
		      <div>
                <!-- IMAGE -->
                <!--for swap image-->
                <?php if ($product['thumb_swap']) { ?>
                  <div class="image">
                      <a href="<?php echo $product['href']; ?>">
                         <img oversrc="<?php echo $product['thumb_swap']; ?>" src="<?php echo $product['thumb']; ?>" 
                         title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" style="border:none"/>
                      </a>
                  </div>
                  <?php } else { ?>
                  <div class="image">
                      <a href="<?php echo $product['href']; ?>">
                          <img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" 
                          alt="<?php echo $product['name']; ?>" style="border:none"/>
                      </a>
                  </div>
                  <?php } ?>
                <!--/ swap img-->
                
                <!-- NAME -->
                <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
                <!-- PRICE -->
                <?php if ($product['price']) { ?>
                <div class="price">
                  <?php if (!$product['special']) { ?>
                  <?php echo $product['price']; ?>
                  <?php } else { ?>
                  <span class="price-new"><?php echo $product['special']; ?></span> - 
                  <span class="price-old"><?php echo $product['price']; ?></span> 
                  <span class="sale radius">-<?php echo $product['saving']; ?>%</span>
                  <?php } ?>
                </div>
                <?php } ?>
                <!-- RATING -->
                <div class="rating"><img src="catalog/view/theme/denzi/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
                <!-- CART -->
                <ul class="cart radius tooltip-title">
                    <li><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" /></li>
                    <li><a class="wish" onclick="addToWishList('<?php echo $product['product_id']; ?>');" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>"><i class="fa fa-heart-o"></i></a></li>
                    <li><a class="compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" data-toggle="tooltip" title="<?php echo $button_compare; ?>"><i class="fa fa-bar-chart-o"></i></a></li>
                    <li><a href="<?php echo str_replace("/product&","/product/details&",$product['href']); ?>" class="href-fa-eye" data-toggle="tooltip" title="<?php echo $quick_view_text; ?>"><i class="fa fa-eye"></i></a></li>
                </ul>
                
                
		      </div>
		      <?php } ?>
		    </div>
		 </div>
		<?php } ?>
		
		<?php if($special_products){ ?>
		 <div id="tab-special-<?php echo $module; ?>" class="tab-pane">
		    <div rel="special" class="box-product <?php echo ($display=="slider")?"slider40":""; ?> sliderproducttabs sliderproducttabsspecial">
		      <?php foreach ($special_products as $product) { ?>
		      <div>
		      	
                <!-- IMAGE -->
                <!--for swap image-->
                <?php if ($product['thumb_swap']) { ?>
                  <div class="image">
                      <a href="<?php echo $product['href']; ?>">
                         <img oversrc="<?php echo $product['thumb_swap']; ?>" src="<?php echo $product['thumb']; ?>" 
                         title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" style="border:none"/>
                      </a>
                  </div>
                  <?php } else { ?>
                  <div class="image">
                      <a href="<?php echo $product['href']; ?>">
                          <img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" 
                          alt="<?php echo $product['name']; ?>" style="border:none"/>
                      </a>
                  </div>
                  <?php } ?>
                <!--/ swap img-->
                
                <!-- NAME -->
                <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
                <!-- PRICE -->
                <?php if ($product['price']) { ?>
                <div class="price">
                  <?php if (!$product['special']) { ?>
                  <?php echo $product['price']; ?>
                  <?php } else { ?>
                  <span class="price-new"><?php echo $product['special']; ?></span> - 
                  <span class="price-old"><?php echo $product['price']; ?></span> 
                  <span class="sale radius">-<?php echo $product['saving']; ?>%</span>
                  <?php } ?>
                </div>
                <?php } ?>
                <!-- RATING -->
                <div class="rating"><img src="catalog/view/theme/denzi/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
                <!-- CART -->
                <ul class="cart radius tooltip-title">
                    <li><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" /></li>
                    <li><a class="wish" onclick="addToWishList('<?php echo $product['product_id']; ?>');" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>"><i class="fa fa-heart-o"></i></a></li>
                    <li><a class="compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');" data-toggle="tooltip" title="<?php echo $button_compare; ?>"><i class="fa fa-bar-chart-o"></i></a></li>
                    <li><a href="<?php echo str_replace("/product&","/product/details&",$product['href']); ?>" class="href-fa-eye" data-toggle="tooltip" title="<?php echo $quick_view_text; ?>"><i class="fa fa-eye"></i></a></li>
                </ul>
                
                
		      </div>
		      <?php } ?>
		    </div>
		 </div>
		<?php } ?>
        </div><!--/tab-content-->
      </div><!--/box-content-->
    </div>

<?php if($display=="slider"){ ?>
<script type="text/javascript">
	var sliderproducttabs =[];
	$(function(){
		$.each($('.sliderproducttabs'),function(i,v){
			var rel=$(this).attr("rel");
				sliderproducttabs[rel]=$('.sliderproducttabs'+rel).bxSlider({
			    slideWidth: 190,
			    minSlides: 1,
			    maxSlides: 5,
			    moveSlides: 1,
			    slideMargin: 30,
			  });
		});
		$('#product-tabs-<?php echo $module; ?> a').click(function (e) {
			e.preventDefault();
			var rel=$(this).attr("rel");
			if($('.sliderproducttabs'+rel).length > 0)
			sliderproducttabs[rel].destroySlider();
			$(this).tab('show');
				if($('.sliderproducttabs'+rel).length > 0){
					sliderproducttabs[rel]=$('.sliderproducttabs'+rel).bxSlider({
					slideWidth: 190,
					minSlides: 1,
					maxSlides: 5,
					moveSlides: 1,
					slideMargin: 30,
				});
			}
		});
	});
</script> 
<?php }else{ ?>
<script type="text/javascript">
	$(function(){
		$('#product-tabs-<?php echo $module; ?> a').click(function (e) {
			e.preventDefault();
			$(this).tab('show');
		});
	});
</script> 
<?php } ?>